# SPDX-License-Identifier: Apache-2.0

add_subdirectory(arch/${ARCH})

target_sources(
  utils
  PRIVATE
  hexdump.c utils.c div64.c random.c bitmap.c cpumask.c
  hweight.c find_bit.c llist.c string_helpers.c kstrtox.c
  cmdline.c ctype.c cpio.c sort.c plist.c rbtree.c time.c
  reciprocal_div.c
)

target_sources_ifdef(
  CONFIG_BITREVERSE
  utils
  PRIVATE
  bitrev.c
)

target_sources_ifdef(
  CONFIG_CRC32
  utils
  PRIVATE
  crc32.c
)
